-- GENERATED SPELL FOR [Nexus Drake Hatchling] --


function spell0_26127(pUnit, Event) --@Drake Hatchling Subdued,n/a--
pUnit:FullCastSpellOnTarget(46691,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26127', 678, 1)
end

function spell1_26127(pUnit, Event) --@Intangible Presence,n/a--
pUnit:FullCastSpellOnTarget(36513,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26127', 8317, 1)
end

function spell2_26127(pUnit, Event) --@Netherbreath,n/a--
pUnit:FullCastSpellOnTarget(36631,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26127', 5500, 1)
end

function Sorts_26127(pUnit, Event)
local choix_sorts_26127 = math.random(0, 2)
if choix_sorts_26127 == 0 then
pUnit:RegisterEvent('spell0_26127', 1, 1)
end
if choix_sorts_26127 == 1 then
pUnit:RegisterEvent('spell1_26127', 1, 1)
end
if choix_sorts_26127 == 2 then
pUnit:RegisterEvent('spell2_26127', 1, 1)
end
end

function mob26127_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26127', math.random(1500, 3000), 1)
end

function mob26127_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26127_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26127_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26127, 1, 'mob26127_Action')
RegisterUnitEvent(26127, 2, 'mob26127_Leave')
RegisterUnitEvent(26127, 3, 'mob26127_Kill')
RegisterUnitEvent(26127, 4, 'mob26127_Die')
